const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  name: state => state.user.userInfo.username,
  staffPhoto: state => state.user.userInfo.staffPhoto,
  routes: state => state.permission.routes,
  roles: state => state.user.userInfo.roles
  // sidebar: (state) =>{
  // return state.app.sidebar
  // }
  // sidebar: state =>state.app.sidebar
  // 在组件中获取sidebar
  // this.$store.state.app.sidebar
  // 在组件中获取getters
  // ...mapGetters([ 'sidebar'])
  // 封装全局getters的作用就是为了获取vuex中state的值方便

}
export default getters
